package net.maku.kyy.entity;

import lombok.*;
import com.baomidou.mybatisplus.annotation.*;

import java.time.LocalDateTime;

/**
 * 应用用户token表
 *
 * @author MAKU babamu@126.com
 * <a href="https://maku.net">MAKU</a>
 */
@AllArgsConstructor
@NoArgsConstructor
@Builder
@Data
@TableName("kyy_user_token")
public class KyyUserTokenEntity {
	/**
	* id
	*/
	@TableId
	@TableField(value = "id")
	private Long id;

	/**
	* 用户ID
	*/
	@TableField(value = "user_id")
	private Long userId;

	/**
	* accessToken
	*/
	@TableField(value = "access_token")
	private String accessToken;

	/**
	* accessToken 过期时间
	*/
	@TableField(value = "access_token_expire")
	private LocalDateTime accessTokenExpire;

	/**
	* refreshToken
	*/
	@TableField(value = "refresh_token")
	private String refreshToken;

	/**
	* refreshToken 过期时间
	*/
	@TableField(value = "refresh_token_expire")
	private LocalDateTime refreshTokenExpire;

	/**
	* 租户ID
	*/
	@TableField(value = "tenant_id")
	private Integer tenantId;

	/**
	* 创建时间
	*/
	@TableField(value = "create_time", fill = FieldFill.INSERT)
	private LocalDateTime createTime;

}